<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML>
<html>
	<head>
		<base href="<%=basePath%>">

		<title>添加图书</title>
		<link rel="stylesheet" type="text/css"
			href="<%=basePath%>jslib/bootstrap/css/bootstrap.css">
			
		<link rel="stylesheet" type="text/css"
			href="<%=basePath%>jslib/bootstrap/css/bootstrap.min.css">
		<!-- yangshi  -->
		<link rel="stylesheet" type="text/css"
			href="<%=basePath%>bootstrap-datetimepicker-master/css/bootstrap-datetimepicker.min.css">
		<link rel="stylesheet"
			href="<%=basePath%>font-awesome/css/font-awesome.css">
		<link rel="stylesheet" type="text/css"
			href="<%=basePath%>css/theme.css">              <!--主题样式-->
		<script src="<%=basePath%>jquery/jquery.min.js"
			type="text/javascript"></script>
		<script src="http://code.jquery.com/ui/1.10.2/jquery-ui.js"></script>
		<script src="<%=basePath%>bootstrap-datetimepicker-master/sample in bootstrap v3/js/bootstrap.min.js"
			type="text/javascript"></script>
		<script src="<%=basePath%>bootstrap-datetimepicker-master/js/bootstrap-datetimepicker.js"
			type="text/javascript"></script>
	    <script src="<%=basePath%>bootstrap-datetimepicker-master/js/locales/bootstrap-datetimepicker.zh-CN.js"
			type="text/javascript"></script>
	<style type="text/css">
		
		.icon-th{
			height: 19px;padding-top: 5px;
		}
	</style>


	</head>

	<body class="content1">
		<div class="header">
			<h1 class="page-title">
				图书管理系统
			</h1>
		</div>

		<ul class="breadcrumb">
			<li>
				<a href="index.html">图书管理</a>
				<span class="divider">/</span>
			</li>
			<li class="active">
				编辑图书(${item.bookname})
			</li>
		</ul>

		<div class="container-fluid">
			<div class="row-fluid">
				<form method="post" action="<%=basePath%>sys/book?cmd=editbook&btid=${item.btid}">
					<div class="btn-toolbar">
						<input type="submit" class="btn btn-primary" value="提交 ">
						<a href="<%=basePath%>sys/book?cmd=list&btid=${item.btid}" class="btn">取消</a>

					</div>

					<div class="well">
						<div class="tab-pane active in">
							<label>
								类型：
							</label>
								<select name="btid">
									<c:forEach items="${list}" var="type">										
										<option value="${type.btid}" 
											<c:if test="${type.btid eq item.btid}">
											selected="selected" 

											</c:if>
											/>
											${type.btname}
										</option>						
									</c:forEach>
								</select>
							<label>
								图书名：
							</label>
							<input type="hidden" name="bookid" value="${item.bookid}" />
							<input type="text" name="bookname" maxlength="20"  value="${item.bookname}" >
							<label>
								作者：
							</label>
							<input type="text" name="bookauthor" value="${item.bookauthor}" maxlength="20"/>
							<label>
								图书封面：
							</label>
							<input type="text" name="bookimg" value="${item.bookimg}" maxlength="200">
							<label>
								书的isbn号：
							</label>
							<input type="text" name="bookisbn" value="${item.bookisbn}" maxlength="20">
							<label>
								成本价：
							</label>
							<input type="text" name="bookprice" value="${item.bookprice}" maxlength="20">
							<label>
								售价：
							</label>
							<input type="text" name="booksaleprice" value="${item.booksaleprice}" maxlength="20">						
							<label>
								出版社ID：
							</label>
							<input type="text" name="bookpubuserid" value="${item.bookpubuserid}" maxlength="20">
							<label>
								出版社：
							</label>
							<input type="text" name="bookpubusername" value="${item.bookpubusername}"  maxlength="20">
							<label>
								出版时间：
							</label>
							<div class="input-append date form_datetime" style="display:inline-block;width:350px;">
								<input type="text" name="bookpubtime" class="span12" maxlength="20" readonly>
								<span class="add-on" style="height: 19px;padding-top: 5px;">
                                   <i class="icon-th" ></i>
                                </span>
							</div>	
							 <script type="text/javascript">
							    $(".form_datetime").datetimepicker({
							        format: "dd-MM-yyyy",
							        autoclose: true,
							        todayBtn: true,
							        startDate: "09-09-2016",
							        minView :2,      //去掉时分
							        minuteStep: 10,
							        language: 'zh-CN'
							    });
						     </script>
							<label>
								状态：
							</label>
							<select name="bookstate">
								<c:choose>
									<c:when test="${item.bookstate==\"1\"}">
										<option value="1" selected="selected">正常</option>
										<option value="0">不可用</option>		
									</c:when>
									<c:otherwise>
										<option value="1">正常</option>
										<option value="0" selected="selected">不可用</option>	
									</c:otherwise>
								</c:choose>
							</select>
							<label>
								是否热卖：
							</label>
							<select name="bookishot">
								<c:choose>
									<c:when test="${item.bookishot==\"1\"}">
										<option value="1" selected="selected">热卖</option>
										<option value="0">不热卖</option>		
									</c:when>
									<c:otherwise>
										<option value="1">热卖</option>
										<option value="0" selected="selected">不热卖</option>	
									</c:otherwise>
								</c:choose>
							</select>
							<label>
								审核状态：
							</label>
							<select name="bookauditstate">
								<c:choose>
									<c:when test="${item.bookauditstate==\"1\"}">
										<option value="1" selected="selected">审合通过</option>
										<option value="0">未审核</option>	
										<option value="2">未通过</option>	
									</c:when>
									<c:when test="${item.bookauditstate==\"0\"}">
										<option value="1">审合通过</option>
										<option value="0" selected="selected">未审核</option>	
										<option value="2">未通过</option>	
									</c:when>
									<c:otherwise>
										<option value="1">审合通过</option>
										<option value="0">未审核</option>	
										<option value="2" selected="selected">未通过</option>		
									</c:otherwise>
								</c:choose>
							</select>
							<label>
								审核员ID：
							</label>
							<input type="text" name="bookaudituserid" value="${item.bookaudituserid}" maxlength="20">
							<label>
								审核员姓名：
							</label>
							<input type="text" name="bookauditusername" value="${item.bookauditusername}" maxlength="20">
							
							<label>
								审核反馈：
							</label>
							<input type="text" name="bookauditfeedback" value="${item.bookauditfeedback}" maxlength="200">
							
							<label>
								审核时间：
							</label>
							<div class="input-append date form_datetime" style="display:inline-block;width:350px;">
								<input type="text" name="bookaudittime" class="span12" maxlength="20" readonly>
								<span class="add-on" ">
                                   <i class="icon-th"></i>
                                </span>
							</div>	
							 <script type="text/javascript">
							    $(".form_datetime").datetimepicker({
							        format: "dd-MM-yyyy",
							        autoclose: true,
							        todayBtn: true,
							        startDate: "09-09-2016",
							        minView :2,      //去掉时分
							        minuteStep: 10,
							        language: 'zh-CN'
							    });
						     </script>
							<!-- 还没完成呢  从数据库里调用角色的信息 -->
							
							
							
							<div style="color: red">
								${msg}
							</div>
						</div>
					</div>
				</form>
			</div>
		</div>
	</body>
</html>
